<!DOCTYPE html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT">





  <link rel="alternate" href="/atom.xml" title="renhao" type="application/atom+xml">






<meta name="description" content="css flex布局中，justify-content属性可以控制列表的水平对齐方式，例如space-between值可以实现两端对齐，如果最后一行的列表个数不满就会出现最后一行可能会为了实现两端对齐拉伸空隙而没有完全垂直对齐的问题。本文讨论在两端对齐的基础上实现最后一行列表左对齐的众多方法。">
<meta property="og:type" content="article">
<meta property="og:title" content="CSS flex布局两端对齐最后一行列表左对齐的方法">
<meta property="og:url" content="https://huangrenhao.gitee.io/2019/09/26/css-flex-justify-content/index.html">
<meta property="og:site_name" content="renhao">
<meta property="og:description" content="css flex布局中，justify-content属性可以控制列表的水平对齐方式，例如space-between值可以实现两端对齐，如果最后一行的列表个数不满就会出现最后一行可能会为了实现两端对齐拉伸空隙而没有完全垂直对齐的问题。本文讨论在两端对齐的基础上实现最后一行列表左对齐的众多方法。">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2020-09-03T08:50:36.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="CSS flex布局两端对齐最后一行列表左对齐的方法">
<meta name="twitter:description" content="css flex布局中，justify-content属性可以控制列表的水平对齐方式，例如space-between值可以实现两端对齐，如果最后一行的列表个数不满就会出现最后一行可能会为了实现两端对齐拉伸空隙而没有完全垂直对齐的问题。本文讨论在两端对齐的基础上实现最后一行列表左对齐的众多方法。">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://huangrenhao.gitee.io/2019/09/26/css-flex-justify-content/">





  <title>CSS flex布局两端对齐最后一行列表左对齐的方法 | renhao</title>
  








<link rel="stylesheet" href="/css/prism-tomorrow.css" type="text/css"></head>

<body itemscope="" itemtype="http://schema.org/WebPage" lang="zh-Hans">
  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope="" itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">renhao</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://huangrenhao.gitee.io/2019/09/26/css-flex-justify-content/">

    <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person">
      <meta itemprop="name" content="renhao">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="renhao">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">CSS flex布局两端对齐最后一行列表左对齐的方法</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2019-09-26T08:18:01+08:00">
                2019-09-26
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
                  <a href="/categories/css/" itemprop="url" rel="index">
                    <span itemprop="name">css</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/2019/09/26/css-flex-justify-content/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count valine-comment-count" data-xid="/2019/09/26/css-flex-justify-content/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  1.6k
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  6
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>css flex布局中，<code>justify-content</code>属性可以控制列表的水平对齐方式，例如<code>space-between</code>值可以实现两端对齐，如果最后一行的列表个数不满就会出现最后一行可能会为了实现两端对齐拉伸空隙而没有完全垂直对齐的问题。本文讨论在两端对齐的基础上实现最后一行列表左对齐的众多方法。<a id="more"></a></p>
<p><a href="https://www.zhangxinxu.com/wordpress/2019/08/css-flex-last-align/" target="_blank" rel="noopener">张鑫旭原文</a></p>
<p>实例：</p>
<pre><code>.container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.list {
    width: 24%; height: 100px;
    background-color: skyblue;
    margin-top: 15px;
}
</code></pre><pre><code>&lt;div class=&quot;container&quot;&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre><h3 id="每一行列表的列数、列表元素宽度都是固定的"><a href="#每一行列表的列数、列表元素宽度都是固定的" class="headerlink" title="每一行列表的列数、列表元素宽度都是固定的"></a>每一行列表的列数、列表元素宽度都是固定的</h3><ul>
<li><p>模拟space-between和间隙</p>
<p>不使用<code>justify-content:space-between</code>实现两端对齐，而是用margin进行模拟</p>
<pre><code>.container {
    display: flex;
    flex-wrap: wrap;
}
.list {
    width: 24%; height: 100px;
    background-color: skyblue;
    margin-top: 15px;
}
.list:not(:nth-child(4n)) {
    margin-right: calc(4% / 3);
}
</code></pre><blockquote>
<p><a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/:not" target="_blank" rel="noopener"><code>:not(x)</code></a>否定伪类，以一个简单的选择器x为参数的功能性标记函数，匹配不符合参数选择器x描述的元素；CSS伪类<a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/:nth-child" target="_blank" rel="noopener"><code>:nth-child(an+b)</code></a>首先找到当前元素的兄弟元素，然后按照位置先后顺序从1开始排序（这里指的是当前元素的父元素的所有子元素的重新排序，父元素的第一个子元素序号为1，与子元素的类无关），选择的结果为CSS伪类：nth-child括号中表达式（an+b）匹配到的元素集合（n=0,1,2,3…）；<a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/calc" target="_blank" rel="noopener"><code>calc(expression)</code></a>用一个表达式作为参数，用这个表达式的结果作为值，如<code>(100%-80px)</code>表示最后以整个屏幕大小减去80px。</p>
</blockquote>
<p>这里表示的就是不是最后一列的列表元素的右边距就是1.3%，以这样的形式实现了固定列数列表的两端对齐。</p>
</li>
<li><p>根据个数最后一个元素动态margin</p>
<p>仍然使用<code>justify-content:space-between</code>，但最后一个元素的margin另行计算为实现垂直对齐的空余部分的宽度。</p>
<pre><code>.container {
    display: flex;
    /* 两端对齐 */
    justify-content: space-between;
    flex-wrap: wrap;
}
.list {
    width: 24%; height: 100px;
    background-color: skyblue;
    margin-top: 15px;
}
/* 如果最后一行是3个元素 */
.list:last-child:nth-child(4n - 1) {
    margin-right: calc(24% + 4% / 3);
}
/* 如果最后一行是2个元素 */
.list:last-child:nth-child(4n - 2) {
    margin-right: calc(48% + 8% / 3);
}
</code></pre><p>根据最后一个元素给出的<code>nth-child</code>序号来判断最后一个元素所处的位置是倒数第几个，然后动态设置其margin。</p>
</li>
</ul>
<h3 id="每一行列数不固定、列表元素宽度固定"><a href="#每一行列数不固定、列表元素宽度固定" class="headerlink" title="每一行列数不固定、列表元素宽度固定"></a>每一行列数不固定、列表元素宽度固定</h3><p>这种情况我先想着不是和第一种情况类似吗？其实不是，如果直接指定每一项的右边距并以此来分隔实现两端对齐会发现没有实现想要的结果，由于元素的宽度并不一定恰好的划分其间距，每一行最后一个元素后可能会无法放入而一个完整的元素从而只能从下一行开始，会产生一个比较大的空白。所以解决这个问题就需要实现列表元素之间的间距如何动态的设置。</p>
<ul>
<li><p>使用空白标签进行填充占位</p>
<p>使用足够的空白标签进行填充占位，具体的占位数量是由最多列数的个数决定（这里总共7个，最多7列，占位符最多要有5个）。实现关键就是占位<code>&lt;i&gt;</code>元素宽度和<code>margin</code>大小设置得和列表元素相同。</p>
<pre><code>.container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-right: -10px;
}
.list {
    width: 100px; height:100px;
    background-color: skyblue;
    margin: 15px 10px 0 0;
}
/* 和列表一样的宽度和margin值 */
.container &gt; i {
    width: 100px;
    margin-right: 10px;
}
</code></pre><pre><code>&lt;div class=&quot;container&quot;&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;list&quot;&gt;&lt;/div&gt;
    &lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;
&lt;/div&gt;
</code></pre><p>发现只有在列表中成功占位的<code>&lt;i&gt;</code>才有高度，剩余的<code>&lt;i&gt;</code>元素高度为0，不会影响垂直方向上的页面布局。那么成功占位的<code>&lt;i&gt;</code>元素的高度又是从何而来？</p>
</li>
<li><p>使用Grid布局</p>
<p>Grid布局天然有间隙并且格子对齐排布，自动实现了最后一行左对齐。</p>
<pre><code>.container {
    display: grid;
    justify-content: space-between;
    grid-template-columns: repeat(auto-fill, 100px);
    grid-gap: 10px;
}
.list {
    width: 100px; height:100px;
    background-color: skyblue;
    margin-top: 5px;
}
</code></pre></li>
</ul>
<h3 id="列表元素宽度不固定"><a href="#列表元素宽度不固定" class="headerlink" title="列表元素宽度不固定"></a>列表元素宽度不固定</h3><p>flex子项的宽度都是不固定的，间隙大小不固定，对齐不严格，直接上最后一行左对齐即可。</p>
<ul>
<li><p>最后一项<code>margin-right:auto</code></p>
<pre><code>.container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.list {
    background-color: skyblue;
    margin: 10px;
}
/* 最后一项margin-right:auto */
.list:last-child {
    margin-right: auto;
}
</code></pre></li>
<li><p>创建伪元素并设置<code>flex:auto</code>或<code>flex:1</code></p>
<pre><code>.container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.list {
    background-color: skyblue;
    margin: 10px;
}
/* 使用伪元素辅助左对齐 */
.container::after {
    content: &#39;&#39;;
    flex: auto;    /* 或者flex: 1 */
}
</code></pre><blockquote>
<p>CSS伪元素<a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/::after" target="_blank" rel="noopener"><code>::after</code></a>用来创建一个伪元素，作为已选中元素的最后一个子元素，通常配合<code>content</code>属性来为该元素添加装饰内容，这个虚拟元素默认是行内元素。CSS属性<a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/flex" target="_blank" rel="noopener"><code>flex</code></a>规定弹性元素如何伸长或缩短以适应flex容器中的可用空间，可以用来设置<code>flex-grow</code>（弹性盒子项(flex item)的拉伸因子为）、<code>flex-shrink</code>（flex元素的收缩规则）、<code>flex-basis</code>（元素在主轴上的初始大小）。flex属性可以指定1个、2个、3个值，与之前的三个属性相对应。<code>flex：1</code>表示<code>flex-grow:1</code>（只会伸长并吸收flex容器中额外的自由空间，但不会缩短自身以适应容器）。<code>flex:auto</code>等同于<code>flex: 1 1 auto</code>，元素会根据自身宽高来确定尺寸，但是会伸长并吸收flex容器中额外的自由空间，也会缩短自身来适应flex容器。</p>
</blockquote>
</li>
</ul>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2019/09/23/js-call-apply/" rel="next" title="js中call、apply、bind方法">
                <i class="fa fa-chevron-left"></i> js中call、apply、bind方法
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2019/09/27/css-bfc/" rel="prev" title="BFC">
                BFC <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
    </div>
  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">renhao</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">94</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">19</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#每一行列表的列数、列表元素宽度都是固定的"><span class="nav-number">1.</span> <span class="nav-text">每一行列表的列数、列表元素宽度都是固定的</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#每一行列数不固定、列表元素宽度固定"><span class="nav-number">2.</span> <span class="nav-text">每一行列数不固定、列表元素宽度固定</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#列表元素宽度不固定"><span class="nav-number">3.</span> <span class="nav-text">列表元素宽度不固定</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">renhao</span>

  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    
      <span class="post-meta-item-text">Site words total count&#58;</span>
    
    <span title="Site words total count">265.9k</span>
  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Muse</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  










  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src="//unpkg.com/valine/dist/Valine.min.js"></script>
  
  <script type="text/javascript">
    var GUEST = ['nick','mail','link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item=>{
      return GUEST.indexOf(item)>-1;
    });
    new Valine({
        el: '#comments' ,
        verify: false,
        notify: false,
        appId: '2P1xqUWiCoNm14MH4yhURlJi-gzGzoHsz',
        appKey: 'uJN0uagHIVgXtBO1OuLV9Ban',
        placeholder: 'Just go go',
        avatar:'mm',
        guest_info:guest,
        pageSize:'10' || 10,
    });
  </script>



  





  

  

  

  
  

  

  

  

</body>
</html>
